<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.*" %>
<%@ page import="au.com.somethingwritten.model.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>Something Written</title>
		<link rel="stylesheet" type="text/css" href="style.css" />
	</head>
	<body>
	<div id="main">
	<div id="main_overlay">
		<div id="header">
		<a class="skip_to_content" href="#content" tabindex="1">skip to content</a><br />
			<a href="/SomethingWritten/" tabindex="2">
				<img id="logo" src="Images/logo.png" alt="Something Written Logo" />
			</a>
			<%
  			ShoppingCart tmpCart = (ShoppingCart)session.getAttribute("cart");
			if(tmpCart == null){
				tmpCart = new ShoppingCart();
			}
			%>
			<a href="/SomethingWritten/cartPage.jsp" id="cart_link" tabindex="3">Shopping Cart(<% out.print(tmpCart.getTotalItems().toString()); %>)</a>
		</div>
		<div id="top_menu">
			<a class="top_link" href="/SomethingWritten/" tabindex="4">home</a>
			<a class="top_link" href="/SomethingWritten/browse" tabindex="5">browse</a>
			<a class="top_link" href="/SomethingWritten/aboutPage.jsp" tabindex="6">about us</a>
			<a class="top_link" href="/SomethingWritten/basicSearch" tabindex="7">search</a>
			<div id="search_container">
				<form name="basic_search" method="post" action="basicSearch">
					<button id="search_button" type="submit" name="search_button" tabindex="9">search</button>
					<input title="search input" id="search_input" type="text" name="search_text" tabindex="8"/>
				</form>
			</div>
		</div>
		<div id="content">
		<%
			String embeddedPageName =
			request.getParameter("embeddedPageName");
			String submitPageName =
			request.getParameter("submitPageName");
		%>
		<jsp:include page="<%=embeddedPageName%>">
        <jsp:param name="fromMasterPage" value="true"/>
        </jsp:include>
		</div>
		<br/><br/><br/>
		</div>
		<div id="footer">
			<br />
			Something Written &#169; 2012 - All Rights Reserved.
		</div>
	</div>
	</body>
</html>